package com.xiaocg.strategy;

import java.util.Arrays;

public class StrategyTest {
    public static void main(String[] args) {
        StrategyContext context = new StrategyContext();
        AbstractStrategy strategy = new AbstractStrategyA();
        context.setStrategy(strategy);
        context.salesGoods();

        System.out.println("-------------");

        AbstractStrategy strategy1 = new AbstractStrategyB();
        context.setStrategy(strategy1);
        context.salesGoods();

    }
}
